#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main()
{
int ret=fork();
if(ret==0)
{
//子进程
while(1)
{
printf("I am child process,my pid is %d,my ppid is %d\n",getpid(),getppid());
sleep(1);
}
}
if(ret>0)
{
//父进程
while(1)
{
  sleep(1);
printf("I am parent process,my pid is %d,my ppid is %d\n",getpid(),getppid());
}
}






  return 0;
}
